/****************************************************************************
 *
 *   Copyright (c) 2020-2021 PX4 Development Team. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 * 3. Neither the name PX4 nor the names of its contributors may be
 *    used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 ****************************************************************************/

#include <stdint.h>

static constexpr float SAMPLING_RES = 10;
static constexpr float SAMPLING_MIN_LAT = -90;
static constexpr float SAMPLING_MAX_LAT = 90;
static constexpr float SAMPLING_MIN_LON = -180;
static constexpr float SAMPLING_MAX_LON = 180;

static constexpr int LAT_DIM = 19;
static constexpr int LON_DIM = 37;


// *INDENT-OFF*
// Magnetic declination data in radians * 10^-4
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2022.2767,
static constexpr const int16_t declination_table[19][37] {
	//    LONGITUDE:   -180,  -170,  -160,  -150,  -140,  -130,  -120,  -110,  -100,   -90,   -80,   -70,   -60,   -50,   -40,   -30,   -20,   -10,     0,    10,    20,    30,    40,    50,    60,    70,    80,    90,   100,   110,   120,   130,   140,   150,   160,   170,   180,
	/* LAT: -90 */ {  25994, 24248, 22503, 20758, 19012, 17267, 15522, 13776, 12031, 10286,  8540,  6795,  5050,  3304,  1559,  -186, -1931, -3677, -5422, -7167, -8912,-10658,-12403,-14148,-15894,-17639,-19384,-21130,-22875,-24621,-26366,-28111,-29857, 31230, 29484, 27739, 25994, },
	/* LAT: -80 */ {  22561, 20428, 18487, 16712, 15071, 13532, 12068, 10657,  9281,  7931,  6599,  5280,  3971,  2666,  1359,    40, -1301, -2672, -4082, -5533, -7026, -8562,-10139,-11758,-13421,-15139,-16924,-18795,-20777,-22895,-25169,-27603,-30172, 30020, 27400, 24893, 22561, },
	/* LAT: -70 */ {  14974, 13576, 12451, 11491, 10623,  9793,  8952,  8065,  7113,  6094,  5024,  3931,  2845,  1789,   767,  -244, -1280, -2384, -3584, -4882, -6261, -7690, -9137,-10578,-12004,-13419,-14847,-16332,-17953,-19864,-22379,-26169, 30744, 24158, 19625, 16846, 14974, },
	/* LAT: -60 */ {   8407,  8164,  7886,  7614,  7363,  7111,  6805,  6374,  5760,  4942,  3942,  2830,  1709,   680,  -204,  -963, -1692, -2513, -3514, -4708, -6036, -7404, -8724, -9935,-11000,-11899,-12616,-13111,-13283,-12834,-10737, -3530,  4869,  7630,  8408,  8538,  8407, },
	/* LAT: -50 */ {   5474,  5512,  5458,  5371,  5299,  5264,  5230,  5105,  4763,  4102,  3094,  1822,   481,  -702, -1577, -2145, -2543, -2982, -3663, -4671, -5911, -7186, -8327, -9231, -9831,-10074, -9883, -9128, -7622, -5263, -2360,   387,  2496,  3921,  4795,  5270,  5474, },
	/* LAT: -40 */ {   3947,  4040,  4049,  4007,  3949,  3916,  3922,  3913,  3741,  3209,  2189,   749,  -815, -2133, -3001, -3457, -3643, -3705, -3871, -4433, -5403, -6478, -7364, -7906, -8017, -7644, -6759, -5376, -3664, -1960,  -499,   722,  1765,  2630,  3285,  3715,  3947, },
	/* LAT: -30 */ {   2977,  3063,  3095,  3083,  3027,  2950,  2891,  2858,  2733,  2258,  1226,  -290, -1898, -3156, -3900, -4250, -4333, -4128, -3695, -3466, -3821, -4566, -5266, -5620, -5499, -4916, -3959, -2752, -1542,  -595,    83,   683,  1307,  1908,  2417,  2778,  2977, },
	/* LAT: -20 */ {   2334,  2381,  2400,  2405,  2365,  2272,  2166,  2090,  1946,  1453,   401, -1085, -2564, -3630, -4169, -4290, -4091, -3538, -2678, -1876, -1593, -1942, -2591, -3063, -3103, -2747, -2113, -1296,  -518,   -28,   235,   537,   977,  1454,  1875,  2182,  2334, },
	/* LAT: -10 */ {   1941,  1935,  1916,  1915,  1890,  1807,  1699,  1609,  1425,   877,  -181, -1556, -2832, -3666, -3940, -3717, -3146, -2367, -1521,  -764,  -295,  -323,  -790, -1297, -1512, -1424, -1112,  -612,  -114,   128,   178,   338,   708,  1144,  1536,  1822,  1941, },
	/* LAT:   0 */ {   1728,  1695,  1641,  1635,  1626,  1559,  1456,  1344,  1091,   472,  -565, -1792, -2849, -3441, -3446, -2952, -2186, -1404,  -750,  -212,   202,   317,    41,  -375,  -632,  -689,  -591,  -328,   -37,    53,    -7,    82,   422,   862,  1281,  1599,  1728, },
	/* LAT:  10 */ {   1593,  1601,  1561,  1579,  1607,  1559,  1440,  1256,   881,   165,  -855, -1932, -2762, -3107, -2909, -2307, -1531,  -818,  -301,    81,   407,   558,   399,    77,  -159,  -267,  -290,  -209,  -104,  -144,  -283,  -256,    45,   497,   977,  1383,  1593, },
	/* LAT:  20 */ {   1410,  1559,  1621,  1715,  1803,  1784,  1632,  1332,   788,   -67, -1110, -2063, -2664, -2779, -2455, -1856, -1146,  -495,   -33,   278,   538,   685,   596,   353,   153,    35,   -56,  -120,  -199,  -388,  -625,  -683,  -450,    -4,   536,  1054,  1410, },
	/* LAT:  30 */ {   1111,  1478,  1739,  1964,  2125,  2136,  1951,  1530,   804,  -224, -1343, -2223, -2643, -2586, -2190, -1612,  -957,  -338,   126,   434,   666,   814,   795,   647,   497,   372,   216,     6,  -276,  -650, -1018, -1179, -1020,  -595,   -19,   590,  1111, },
	/* LAT:  40 */ {    756,  1343,  1837,  2230,  2480,  2524,  2310,  1778,   868,  -359, -1600, -2472, -2797, -2648, -2204, -1613,  -959,  -329,   183,   549,   821,  1021,  1116,  1106,  1030,   882,   614,   205,  -332,  -939, -1461, -1706, -1591, -1175,  -576,    97,   756, },
	/* LAT:  50 */ {    469,  1216,  1897,  2454,  2821,  2928,  2700,  2046,   905,  -593, -2020, -2939, -3238, -3048, -2559, -1914, -1203,  -504,   113,   621,  1041,  1397,  1679,  1851,  1871,  1685,  1241,   535,  -357, -1260, -1941, -2229, -2106, -1665, -1029,  -296,   469, },
	/* LAT:  60 */ {    277,  1130,  1936,  2631,  3136,  3348,  3134,  2322,   806, -1158, -2881, -3865, -4120, -3860, -3287, -2541, -1714,  -872,   -62,   690,  1384,  2016,  2561,  2958,  3120,  2936,  2300,  1187,  -226, -1547, -2419, -2730, -2566, -2071, -1377,  -574,   277, },
	/* LAT:  70 */ {     50,   987,  1885,  2684,  3298,  3592,  3338,  2200,   -46, -2770, -4727, -5553, -5561, -5076, -4304, -3367, -2341, -1273,  -196,   865,  1892,  2860,  3729,  4438,  4888,  4924,  4320,  2853,   664, -1445, -2747, -3193, -3034, -2502, -1751,  -879,    50, },
	/* LAT:  80 */ {   -631,   292,  1145,  1838,  2223,  2036,   828, -1805, -5037, -7161, -7906, -7771, -7138, -6217, -5123, -3921, -2653, -1345,   -18,  1311,  2626,  3909,  5137,  6277,  7274,  8035,  8381,  7944,  6036,  2293, -1297, -3024, -3398, -3075, -2402, -1554,  -631, },
	/* LAT:  90 */ { -29941,-28196,-26450,-24705,-22959,-21214,-19469,-17723,-15978,-14233,-12488,-10742, -8997, -7252, -5507, -3762, -2017,  -271,  1474,  3219,  4964,  6709,  8455, 10200, 11945, 13691, 15436, 17181, 18927, 20672, 22418, 24163, 25909, 27654, 29400, 31145,-29941, },
};

// Magnetic inclination data in radians * 10^-4
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2022.2767,
static constexpr const int16_t inclination_table[19][37] {
	//    LONGITUDE:   -180,  -170,  -160,  -150,  -140,  -130,  -120,  -110,  -100,   -90,   -80,   -70,   -60,   -50,   -40,   -30,   -20,   -10,     0,    10,    20,    30,    40,    50,    60,    70,    80,    90,   100,   110,   120,   130,   140,   150,   160,   170,   180,
	/* LAT: -90 */ { -12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573,-12573, },
	/* LAT: -80 */ { -13658,-13525,-13364,-13184,-12990,-12788,-12584,-12384,-12192,-12016,-11859,-11725,-11615,-11528,-11465,-11423,-11404,-11406,-11433,-11488,-11571,-11685,-11830,-12003,-12201,-12418,-12648,-12881,-13108,-13321,-13508,-13658,-13762,-13814,-13811,-13757,-13658, },
	/* LAT: -70 */ { -14107,-13789,-13469,-13146,-12814,-12470,-12115,-11757,-11414,-11105,-10852,-10668,-10555,-10502,-10489,-10492,-10500,-10510,-10533,-10589,-10697,-10871,-11117,-11431,-11803,-12221,-12668,-13132,-13598,-14051,-14469,-14815,-15004,-14951,-14721,-14423,-14107, },
	/* LAT: -60 */ { -13519,-13166,-12828,-12496,-12152,-11780,-11365,-10910,-10442,-10011, -9680, -9503, -9499, -9635, -9839,-10033,-10159,-10204,-10193,-10178,-10225,-10383,-10671,-11078,-11576,-12131,-12717,-13313,-13902,-14463,-14960,-15250,-15075,-14691,-14285,-13892,-13519, },
	/* LAT: -50 */ { -12496,-12155,-11824,-11502,-11179,-10832,-10433, -9961, -9431, -8909, -8518, -8390, -8588, -9048, -9612,-10125,-10487,-10652,-10625,-10475,-10332,-10336,-10555,-10969,-11509,-12101,-12688,-13227,-13674,-13972,-14081,-14008,-13805,-13521,-13193,-12846,-12496, },
	/* LAT: -40 */ { -11240,-10892,-10545,-10200, -9861, -9523, -9162, -8736, -8214, -7649, -7220, -7175, -7632, -8453, -9375,-10206,-10867,-11304,-11448,-11284,-10944,-10670,-10660,-10938,-11399,-11904,-12350,-12673,-12833,-12839,-12748,-12611,-12432,-12200,-11913,-11586,-11240, },
	/* LAT: -30 */ {  -9602, -9224, -8846, -8456, -8064, -7688, -7331, -6939, -6426, -5814, -5360, -5438, -6202, -7402, -8653, -9750,-10666,-11379,-11782,-11777,-11409,-10901,-10565,-10563,-10813,-11134,-11391,-11506,-11444,-11268,-11094,-10959,-10812,-10605,-10324, -9979, -9602, },
	/* LAT: -20 */ {  -7371, -6933, -6517, -6090, -5645, -5215, -4823, -4409, -3842, -3156, -2705, -2960, -4065, -5674, -7303, -8675, -9744,-10522,-10964,-11003,-10643,-10030, -9471, -9225, -9273, -9435, -9576, -9595, -9423, -9151, -8957, -8869, -8764, -8556, -8239, -7828, -7371, },
	/* LAT: -10 */ {  -4414, -3882, -3430, -2995, -2537, -2086, -1671, -1215,  -587,   118,   483,    61, -1262, -3177, -5153, -6765, -7865, -8502, -8770, -8710, -8303, -7621, -6957, -6611, -6570, -6663, -6781, -6805, -6618, -6322, -6166, -6174, -6133, -5916, -5532, -5006, -4414, },
	/* LAT:   0 */ {   -906,  -286,   176,   578,   996,  1413,  1804,  2249,  2836,  3415,  3621,  3129,  1838,   -69, -2113, -3767, -4780, -5212, -5273, -5104, -4666, -3952, -3247, -2875, -2814, -2884, -3009, -3083, -2953, -2718, -2662, -2804, -2865, -2677, -2253, -1625,  -906, },
	/* LAT:  10 */ {   2562,  3185,  3616,  3956,  4311,  4678,  5031,  5420,  5874,  6246,  6284,  5799,  4720,  3157,  1467,    89,  -719,  -970,  -880,  -646,  -236,   401,  1034,  1372,  1434,  1389,  1288,  1197,  1239,  1343,  1268,  1004,   814,   887,  1239,  1840,  2562, },
	/* LAT:  20 */ {   5416,  5942,  6320,  6614,  6927,  7271,  7615,  7964,  8299,  8501,  8415,  7955,  7122,  6028,  4902,  3992,  3461,  3340,  3488,  3731,  4060,  4525,  4984,  5240,  5296,  5278,  5229,  5172,  5161,  5143,  4970,  4639,  4343,  4254,  4426,  4848,  5416, },
	/* LAT:  30 */ {   7569,  7940,  8257,  8539,  8848,  9196,  9554,  9896, 10174, 10289, 10146,  9726,  9098,  8388,  7727,  7215,  6922,  6879,  7020,  7230,  7476,  7775,  8063,  8237,  8293,  8306,  8307,  8298,  8276,  8194,  7973,  7622,  7268,  7048,  7032,  7226,  7569, },
	/* LAT:  40 */ {   9266,  9486,  9742, 10027, 10354, 10715, 11084, 11423, 11676, 11760, 11611, 11252, 10779, 10306,  9910,  9626,  9476,  9471,  9580,  9741,  9916, 10099, 10271, 10396, 10474, 10534, 10588, 10621, 10605, 10496, 10255,  9905,  9539,  9254,  9111,  9123,  9266, },
	/* LAT:  50 */ {  10801, 10923, 11124, 11394, 11718, 12072, 12427, 12744, 12967, 13027, 12888, 12590, 12226, 11880, 11605, 11418, 11324, 11320, 11385, 11488, 11601, 11717, 11833, 11948, 12066, 12188, 12301, 12374, 12365, 12241, 11996, 11669, 11329, 11045, 10855, 10775, 10801, },
	/* LAT:  60 */ {  12319, 12392, 12543, 12761, 13032, 13333, 13636, 13902, 14078, 14106, 13971, 13721, 13432, 13161, 12940, 12783, 12692, 12660, 12675, 12722, 12790, 12875, 12980, 13112, 13271, 13446, 13611, 13720, 13727, 13608, 13384, 13105, 12826, 12589, 12419, 12327, 12319, },
	/* LAT:  70 */ {  13758, 13801, 13897, 14039, 14219, 14424, 14632, 14814, 14918, 14898, 14760, 14558, 14340, 14136, 13963, 13828, 13733, 13678, 13659, 13671, 13713, 13785, 13888, 14024, 14190, 14377, 14561, 14702, 14749, 14678, 14517, 14318, 14124, 13959, 13839, 13771, 13758, },
	/* LAT:  80 */ {  14998, 15011, 15049, 15109, 15186, 15272, 15351, 15396, 15377, 15298, 15185, 15060, 14937, 14823, 14723, 14641, 14579, 14538, 14519, 14523, 14549, 14598, 14670, 14762, 14874, 15000, 15135, 15267, 15374, 15419, 15381, 15295, 15200, 15116, 15052, 15012, 14998, },
	/* LAT:  90 */ {  15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, 15395, },
};

// Magnetic strength data in milli-Gauss * 10
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2022.2767,
static constexpr const int16_t strength_table[19][37] {
	//    LONGITUDE:  -180, -170, -160, -150, -140, -130, -120, -110, -100,  -90,  -80,  -70,  -60,  -50,  -40,  -30,  -20,  -10,    0,   10,   20,   30,   40,   50,   60,   70,   80,   90,  100,  110,  120,  130,  140,  150,  160,  170,  180,
	/* LAT: -90 */ {  5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, 5453, },
	/* LAT: -80 */ {  6059, 5996, 5917, 5825, 5723, 5611, 5493, 5371, 5249, 5129, 5015, 4910, 4816, 4736, 4673, 4628, 4603, 4601, 4622, 4668, 4739, 4832, 4947, 5078, 5222, 5372, 5521, 5665, 5796, 5909, 6002, 6071, 6116, 6135, 6131, 6105, 6059, },
	/* LAT: -70 */ {  6304, 6171, 6021, 5857, 5678, 5486, 5281, 5066, 4847, 4632, 4429, 4247, 4089, 3958, 3853, 3777, 3729, 3717, 3745, 3821, 3948, 4128, 4356, 4624, 4919, 5226, 5529, 5813, 6063, 6267, 6418, 6514, 6556, 6549, 6499, 6415, 6304, },
	/* LAT: -60 */ {  6189, 5997, 5796, 5588, 5369, 5135, 4878, 4600, 4308, 4018, 3751, 3523, 3343, 3208, 3109, 3036, 2985, 2965, 2991, 3081, 3249, 3500, 3826, 4211, 4633, 5067, 5489, 5873, 6198, 6447, 6610, 6689, 6691, 6629, 6515, 6365, 6189, },
	/* LAT: -50 */ {  5846, 5616, 5384, 5154, 4922, 4677, 4407, 4104, 3775, 3443, 3141, 2900, 2739, 2647, 2599, 2564, 2531, 2505, 2510, 2582, 2754, 3043, 3438, 3909, 4416, 4921, 5397, 5816, 6155, 6397, 6535, 6577, 6534, 6424, 6263, 6065, 5846, },
	/* LAT: -40 */ {  5394, 5149, 4904, 4665, 4431, 4194, 3940, 3656, 3342, 3016, 2717, 2494, 2376, 2350, 2369, 2391, 2396, 2384, 2372, 2400, 2529, 2803, 3219, 3732, 4279, 4803, 5270, 5659, 5952, 6140, 6228, 6231, 6162, 6032, 5851, 5633, 5394, },
	/* LAT: -30 */ {  4879, 4639, 4400, 4166, 3940, 3721, 3503, 3271, 3016, 2741, 2483, 2300, 2229, 2253, 2320, 2391, 2457, 2508, 2531, 2543, 2609, 2806, 3166, 3653, 4184, 4682, 5101, 5419, 5622, 5722, 5749, 5722, 5643, 5511, 5332, 5115, 4879, },
	/* LAT: -20 */ {  4321, 4109, 3901, 3697, 3500, 3318, 3150, 2986, 2809, 2611, 2420, 2286, 2244, 2286, 2375, 2486, 2614, 2743, 2832, 2869, 2894, 2988, 3226, 3608, 4058, 4485, 4834, 5070, 5176, 5184, 5154, 5107, 5025, 4897, 4731, 4534, 4321, },
	/* LAT: -10 */ {  3790, 3630, 3477, 3331, 3196, 3076, 2973, 2881, 2784, 2670, 2548, 2448, 2402, 2425, 2510, 2639, 2794, 2954, 3078, 3142, 3156, 3182, 3304, 3555, 3880, 4202, 4467, 4631, 4667, 4615, 4547, 4483, 4395, 4270, 4121, 3958, 3790, },
	/* LAT:   0 */ {  3412, 3320, 3236, 3163, 3108, 3070, 3044, 3026, 3002, 2955, 2876, 2781, 2700, 2668, 2708, 2810, 2943, 3078, 3194, 3270, 3301, 3323, 3397, 3553, 3761, 3974, 4155, 4261, 4268, 4201, 4113, 4020, 3909, 3777, 3643, 3519, 3412, },
	/* LAT:  10 */ {  3283, 3252, 3232, 3229, 3253, 3301, 3357, 3411, 3447, 3437, 3368, 3254, 3126, 3031, 3003, 3043, 3124, 3222, 3322, 3408, 3472, 3534, 3621, 3739, 3873, 4011, 4131, 4202, 4205, 4143, 4034, 3891, 3729, 3570, 3435, 3338, 3283, },
	/* LAT:  20 */ {  3400, 3403, 3430, 3484, 3576, 3698, 3827, 3945, 4026, 4039, 3965, 3823, 3656, 3515, 3438, 3425, 3459, 3532, 3628, 3725, 3816, 3914, 4024, 4136, 4244, 4355, 4457, 4523, 4534, 4476, 4339, 4138, 3911, 3701, 3539, 3438, 3400, },
	/* LAT:  30 */ {  3723, 3730, 3785, 3885, 4029, 4200, 4376, 4533, 4641, 4668, 4595, 4440, 4250, 4085, 3978, 3931, 3934, 3984, 4071, 4168, 4266, 4371, 4487, 4605, 4724, 4850, 4971, 5057, 5084, 5027, 4871, 4632, 4358, 4104, 3905, 3777, 3723, },
	/* LAT:  40 */ {  4222, 4221, 4287, 4411, 4579, 4767, 4950, 5107, 5212, 5238, 5169, 5020, 4833, 4658, 4529, 4452, 4426, 4447, 4507, 4586, 4672, 4769, 4884, 5017, 5168, 5329, 5480, 5591, 5630, 5577, 5422, 5184, 4910, 4651, 4440, 4295, 4222, },
	/* LAT:  50 */ {  4832, 4825, 4882, 4993, 5140, 5299, 5449, 5570, 5644, 5653, 5589, 5462, 5298, 5134, 4996, 4898, 4843, 4830, 4854, 4904, 4973, 5064, 5182, 5332, 5508, 5692, 5858, 5977, 6021, 5978, 5848, 5652, 5427, 5211, 5031, 4902, 4832, },
	/* LAT:  60 */ {  5392, 5381, 5410, 5473, 5559, 5654, 5741, 5806, 5839, 5830, 5776, 5681, 5560, 5431, 5312, 5216, 5149, 5114, 5112, 5139, 5195, 5282, 5399, 5546, 5713, 5881, 6029, 6133, 6178, 6156, 6073, 5947, 5801, 5658, 5535, 5445, 5392, },
	/* LAT:  70 */ {  5726, 5707, 5704, 5717, 5739, 5766, 5789, 5803, 5803, 5783, 5744, 5686, 5615, 5539, 5465, 5401, 5352, 5324, 5319, 5339, 5384, 5453, 5545, 5653, 5770, 5885, 5984, 6057, 6097, 6100, 6071, 6018, 5951, 5880, 5815, 5763, 5726, },
	/* LAT:  80 */ {  5789, 5772, 5758, 5746, 5736, 5727, 5717, 5705, 5690, 5671, 5649, 5624, 5596, 5569, 5544, 5524, 5510, 5505, 5509, 5524, 5550, 5585, 5628, 5676, 5726, 5774, 5816, 5851, 5875, 5888, 5891, 5884, 5870, 5851, 5830, 5809, 5789, },
	/* LAT:  90 */ {  5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, 5681, },
};
